Method and device for emulating control and/or regulating functions of a control or regulating device

ABSTRACT

A method and an emulation device for emulating control and/or regulating functions of a control or regulating unit, in particular of a motor vehicle. For emulation, the functions are swapped out into an external emulation computer, a data circuit is produced before the beginning of the emulation via a software interface of the emulation computer and a software interface of the control/regulating unit. In order to significantly accelerate the development and programming of new control/regulating functions of the control/regulating unit, the software interfaces are configured for the emulation of different control/regulating functions before the beginning of the emulation without changing the software.

FIELD OF THE INVENTION

The present invention relates to a method of emulating control and/orregulating functions of a control and/or regulating unit, in particularof a motor vehicle. The emulation is performed by swapping out thefunctions into an external emulation computer. A data circuit isproduced before the beginning of the emulation via a software interfaceof the emulation computer and a software interface of thecontrol/regulating unit.

The present invention also relates to an emulation device, whichincludes a control or regulating unit, in particular of a motor vehicle,and an external emulation computer. The emulation device is used foremulating control and/or regulating functions of the control/regulatingunit by swapping out the functions into the emulation computer. Thecontrol/regulating unit and the emulation computer each include asoftware interface and the control/regulating unit and the emulationcomputer are linked to one another via a data circuit which may beproduced via the software interfaces before the beginning of theemulation.

Furthermore, the present invention relates to a memory element for acontrol or regulating unit of a motor vehicle. A computer program isstored on the memory element which is executable on a computing element,in particular on a microprocessor. The memory element is implemented inparticular as a read-only memory, as a random access memory, or as aflash memory. Finally, the present invention also relates to a computerprogram.

BACKGROUND INFORMATION

Emulation devices for emulating control/regulating functions of acontrol/regulating unit are used as prototyping tools in the developmentand/or the software implementation of new control/regulating functions.Such an emulation device is also referred to as a bypass. With the aidof the bypass, functions of an arbitrary control/regulating unit (ECU,electronic control unit) may be swapped out into an external emulationcomputer. The communication between the control/regulating unit and theemulation computer occurs via a data circuit, which is implemented, forexample, as a bus line, in particular as a controller area network (CAN)bus line. For the purpose of communication, a software interface isprovided in both the control/regulating unit and the emulation computer.

A method of emulating functions of a control unit of the type initiallydiscussed in German Published Patent Application No. 33 18 410. Newcontrol/regulating programs may be developed easily in higherprogramming languages on high-performance emulation computers, throughwhich rapid development of the software functions is provided (rapidprototyping). To test the newly programmed functions, the emulationcomputer is linked via the data circuit to a control/regulating unit forwhich the functions were developed. The new functions are emulated onthe emulation computer while the remaining parts of thecontrol/regulating program run on the control/regulating unit.Therefore, a standard control unit may be used even in the developmentphase of new software functions, so that experiments with newlyprogrammed functions run especially close to the standard manner.

Before the beginning of an emulation, the data circuit between theemulation computer and the control unit is produced via the softwareinterfaces. During an initialization phase of the emulation computer, ittransmits specific data of the functions to be emulated in accordancewith a permanently preselected transmission protocol. This data isstored in tables provided for this purpose in the control unit. Inbypass operation, the communication from the control unit to theemulation computer is initiated by fixed trigger events. The type ofcommunication between the control unit and the emulation computer isdefined by the data stored in the tables.

An emulation device of the type initially cited is discussed in GermanPublished Patent Application No. 39 17 979. In this case, a bypass isdiscussed which uses a standardized hardware interface on a control unitfor producing the data circuit. During bypass operation, the controlunit accesses either a read/write memory of the emulation device, inwhich the function to be emulated is stored, or a read memory of thecontrol unit, on which the actual program execution of thecontrol/regulating program is stored. After a trigger event isinitiated, the control/regulating program is no longer executed on themicroprocessor of the control/regulating unit, but rather this switchesover to the read/write memory of the emulation device and executes thefunction to be emulated.

In the present application, reference is expressly made to GermanPublished Patent Application No. 33 18 410 and German Published PatentApplication No. 39 17 979.

In other methods and devices for emulating functions of acontrol/regulating unit, the interfaces of the control/regulating unitand the emulation computer are aligned to the functions to be emulatedand are defined correspondingly (either through fixed programming of thesoftware interfaces or through a fixed hardware configuration of thehardware interfaces). In particular, the protocol for data transmissionbetween the emulation computer and the control/regulating unit ispermanently preselected during bypass operation. Therefore, for example,the size of the tables, the word length of the transmitted configurationdata, the timing code for the data transmission, and statements aboutwhether operation occurs with or without monitoring of the data circuitmay only be adjusted to new control/regulating functions to be emulatedby complicated reprogramming of the software interfaces. Thepossibilities of rapid prototyping are significantly restricted by thesenecessary changes of the software at the interfaces.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide for acceleration ofthe development and programming of new control/regulating functions of acontrol/regulating unit.

To achieve this object, the exemplary method of the present inventionprovides, on the basis of the method of emulating control/regulatingfunctions of the type initially cited, that the software interfaces areconfigured for the emulation of different control/regulating functionsbefore the beginning of the emulation without changing the software.

According to the exemplary embodiment of the present invention, thesoftware interfaces are therefore freely programmable, so that aprotocol for data transmission between the control/regulating unit andthe emulation computer may be adjusted to the particularcontrol/regulating functions to be emulated. The adjustment is performedwithout reprogramming of the software interfaces. In this manner, newpossibilities open up within the framework of rapid prototyping for thedevelopment and programming of new control/regulating functions of acontrol/regulating unit.

To configure the software interfaces, configuration data is transmittedfrom the emulation computer to the control/regulating unit via the datacircuit before the emulation of control/regulating functions. Theconfiguration data includes, for example, the size of the tables inwhich data for defining the functions to be emulated is stored, the wordlengths of the data, the timing code in which the control/regulatingprogram runs, and statements about whether or not the data circuit willbe monitored during bypass operation. The timing code may either bepermanently preselected or event-oriented. The configuration data isused for specifying the transmission protocol for the data transmissionand for configuring the software interfaces.

According to an exemplary embodiment of the present invention, softwareinterfaces are configured for the emulation of differentcontrol/regulating functions from a preselectable set of measured andintervention variables. Therefore, the data suitable for the currentfunction to be emulated is selected from an already existing libraryincluding various configuration data and the software interfaces areprogrammed accordingly.

According to an exemplary embodiment of the present invention, theresources for the data circuit and the resources of a read/write memoryof the control/regulating unit are dynamically managed in accordancewith the interface configuration. Therefore, a type of allocation layeris introduced, which redirects the accesses to the data stored in thetables to the appropriate table and the appropriate table position. Bydefining this allocation layer before the beginning of the emulation,the size of the tables and the word lengths of the data stored thereinmay be selected variably and/or adjusted to the interface configuration.

According to another exemplary embodiment of the present invention, theconfiguration is defined on the emulation computer and the configurationdata is transmitted to the control/regulating unit via the data circuitbefore the beginning of the emulation. How the software interfaces ofthe emulation computer and the control/regulating unit are to beconfigured is also defined in the course of programming the function tobe emulated on the emulation computer in a higher programming language.Before the beginning of the emulation, the configuration data is thentransmitted to the control/regulating unit.

The configuration data is transmitted to the control/regulating unitduring an initialization phase of the emulation computer.

To achieve the object of the exemplary embodiment of the presentinvention, it is provided, on the basis of the emulation device of thetype initially cited, that the software interfaces be configurable forthe emulation of different control/regulating functions before thebeginning of the emulation, without changing the software.

According to an exemplary embodiment of the present invention, it issuggested that the data circuit is implemented as a serial bus system,in particular as a controller area network (CAN) bus.

The implementation of the exemplary method according to the presentinvention in the form of a memory element which is provided for acontrol/regulating unit of a motor vehicle is of particularsignificance. A computer program is stored on the memory element whichis executable on a computing element, in particular on a microprocessorof the control/regulating unit, and is suitable for performing theexemplary method according to the present invention. In this case, thepresent invention is therefore implemented by a computer program storedon a memory element, so that this memory element provided with thecomputer program represents the present invention in the same manner asthe method which the computer program is suitable for executing. Anelectrical memory medium may, in particular, be used as a memoryelement, for example, a read-only memory, a random access memory, or aflash memory.

The present invention also relates to a computer program which issuitable for performing the exemplary method according to the presentinvention when it is executed on a computing element, in particular on amicroprocessor. In particular, it the computer program may be stored ona memory element, in particular on a flash memory.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of an emulation device according to thepresent invention according to an exemplary embodiment.

FIG. 2 shows a flow chart of an emulation method according to thepresent invention according to an exemplary embodiment.

DETAILED DESCRIPTION

In FIG. 1, an exemplary emulation device according to the presentinvention is indicated as a whole with reference number 1. Emulationdevice 1 includes a control or regulating unit 2 of a motor vehicle andan external emulation computer 3. Emulation device 1 is used as aprototyping tool for rapid prototyping of software. Control/regulatingunit 2 is used for control/regulation of specific functions of a motorvehicle, for example, the internal combustion engine, the steering, thebrakes, the transmission, and/or the road holding of the motor vehicle.Control/regulating unit 2 includes a memory element 4, on which acontrol/regulating program is stored. Memory element 4 is implemented asa flash memory, for example. The control/regulating program isexecutable on a microprocessor 5. During the program execution, data isread out of and/or stored in a read/write memory 6. Control/regulatingunit 2 fulfills the control/regulating task assigned to it by executingthe control/regulating program.

Emulation computer 3 includes a display screen 7 and alternativelyfurther output devices and a keyboard 8 and alternatively further inputdevices. New or altered control/regulating functions of thecontrol/regulating program are programmed on emulation computer 3. Totest the newly programmed functions in bypass operation, emulationcomputer 3 is first connected to control/regulating unit 2 via a datacircuit 9. Data circuit 9 is implemented as a controller area network(CAN) bus line.

During bypass operation, the control/regulating program is executed oncontrol/regulating unit 2. As soon as a trigger event is initiatedduring the program execution, the control/regulating program functionmodeled in emulation computer 3 is called and executed. The emulationcomputer includes a further memory element 10, on which thecontrol/regulating function to be emulated is stored. To execute thefunction, emulation computer 3 includes a microprocessor 10. Before orduring the execution of the program function, data is read out ofread/write memory 6 of control/regulating unit 2 via data circuit 9 and,after the program execution, stored in this memory.

After the execution of the program function in emulation computer 3, theexecution of the control/regulating program in control/regulating unit 2is returned to.

Alternatively, the regulating program in control/regulating unit 2 andthe program function in emulation computer 3 may also run parallel toone another. In this manner, a newly developed control/regulatingprogram function may be executed on a standard control/regulating unit 2even in the development phase, which may allow testing which isespecially close to standard.

A freely configurable software interface 12, 13 is implemented on bothemulation computer 3 and control/regulating unit 2 for controlling andcoordinating the communication between emulation computer 3 andcontrol/regulating unit 2. Together with the programming of thecontrol/regulating function, configuration data for configuring softwareinterfaces 12, 13 is also developed. The configuration data suitable forthe current function to be emulated may, for example, be taken from anexisting library including different configuration data. Through thefree configuration of software interfaces 12, 13, a protocol for thedata transmission between control/regulating unit 2 and emulationcomputer 3 may be adjusted to the particular control/regulatingfunctions to be emulated. Complicated reprogramming of the softwareinterfaces to emulate different functions is no longer necessary.

The configuration data includes, for example, the size of tables inwhich data for defining the functions to be emulated is stored, the wordlengths of the data, the timing code in which work is done, andstatements about whether or not data circuit 9 will be monitored duringbypass operation. The tables are stored in read/write memory 6.According to the present invention, the accesses to the data stored inthe tables are redirected to the appropriate tables and the appropriatetable positions using an allocation layer.

Before the beginning of the emulation of the newly programmed functionsin emulation computer 3, the configuration data is transmitted tocontrol/regulating unit 2 via data circuit 9 during an initializationphase of emulation computer 3, and software interfaces 12, 13 areconfigured accordingly. During the initialization, the hardwareinterfaces (CAN) are also initialized and/or configured in accordancewith the configuration.

The exemplary method according to the present invention for bypassoperation of a control/regulating unit 2 of a motor vehicle is describedin the following with reference to FIG. 2. The method begins in afunction block 20. This is followed by initialization of emulationcomputer 3 in function block 21. In the course of the initialization,the configuration data is also transmitted to control/regulating unit 2.In a function block 22, software interfaces 12, 13 are then configuredin accordance with the configuration data.

The execution of the control/regulating program in control/regulatingunit 2 is then begun in a function block 23. The control/regulatingprogram may also be started even before the interface initialization(function block 22). The calculation on emulation device 1 is started bya trigger. The trigger events are defined via the configuration ofsoftware interfaces 12, 13 in function block 22. After the execution ofthe control/regulating program and/or of the control/regulatingfunction, control/regulating unit 2 and emulation computer 3 write theresults in read/write memory 6.

In a query block 24, it is checked whether data is to be retrieved fromread/write memory 6 during the program execution. If yes, data isretrieved from read/write memory 6 in function block 25. Subsequently,the execution of the control/regulating program in control/regulatingunit 2 is returned to and query block 24 is branched to.

If there is no more data to be retrieved from read/write memory 6, it ischecked in a query block 26 whether the control/regulating program hasended. If yes, it is ended in a function block 27. Otherwise, executionof the control/regulating program is continued in control/regulatingunit 2 and query block 24 is branched to.

1. A method of a control arrangement of a motor vehicle, the methodcomprising: executing, by a processor of a regulating device, aregulating program to control functions of the motor vehicle; during theexecution and responsive to a trigger event, calling a regulatingfunction modeled in an emulation computer; responsive to the calling,executing, by a processor of the emulation computer, the modeledregulating function; one of before and during the execution of themodeled regulating function, reading out data from a memory of theregulating device and transmitting the read data to the emulationcomputer; after the execution of the modeled regulating function:transmitting data from the emulation computer to the memory of theregulating device; and continuing, by the processor of the regulatingdevice, the execution of the regulating program; and adjusting aprotocol for the data transmission between the regulating device and theemulation computer, the adjustment (a) being dependent on the modeledregulating function being called, and (b) being performed usingconfiguration data; wherein the configuration data is used forconfiguring software interfaces between the regulating device and theemulation computer.
 2. The method of claim 1, wherein, based on themodeled regulating function to be executed by the processor of theemulation computer, the configuration data is selected by selecting froma set of variables of a library.
 3. The method of claim 2, whereinresources for a data circuit connecting the regulating device and theemulation computer and resources of the memory of the regulating deviceare dynamically managed in accordance with the configuration of thesoftware interfaces.
 4. The method of claim 1, wherein the configurationof the software interfaces is defined on the emulation computer.
 5. Themethod of claim 1, further comprising: transmitting the configurationdata from the emulation computer to the regulating device during aninitialization phase of the emulation computer in order to configure thesoftware interfaces.
 6. The method of claim 1, wherein, based on themodeled regulating function to be executed by the processor of theemulation computer, the configuration data is selected from a librarythat includes a plurality of configuration data.
 7. The method of claim6, wherein the selected configuration data defines a size of a table ofthe memory of the regulating device and in which data is to be stored.8. The method of claim 6, wherein the selected configuration datadefines a data word length.
 9. The method of claim 6, wherein theselected configuration data defines a timing in which processing isperformed.
 10. The method of claim 6, wherein the selected configurationdata defines whether a data circuit, by which the regulating device andthe emulation computer are connected to each other, will be monitored.11. The method of claim 1, wherein the executing of the regulatingprogram is begun prior to the configuration of the software interfaces.12. The method of claim 1, wherein, based on the modeled regulatingfunction to be executed by the processor of the emulation computer, theconfiguration data is selected by selecting from a set of variables of alibrary.
 13. The method of claim 1, wherein the adjusting of theprotocol includes defining an allocation layer to which accesses of thememory of the regulating device are directed, the allocation layerredirecting the accesses to portions of the memory.
 14. The method ofclaim 1, wherein the configuration data is defined using the emulationcomputer.
 15. A control arrangement of a motor vehicle, the controlarrangement comprising: a regulating device that is configured toexecute a regulating program to control functions of the motor vehicleand that includes a first software interface; an emulation computer thatincludes a second software interface, the first and second softwareinterfaces being configured to interface between the regulating deviceand the emulation computer; and a data circuit to link the regulatingdevice and the emulation computer; wherein: the regulating device isconfigure to, during the execution of the regulating program andresponsive to a trigger event, call a regulating function modeled in theemulation computer; the emulation computer is configured to execute themodeled regulating function; the control arrangement is configured suchthat: one of before and during the execution of the modeled regulatingfunction, data is read from a memory of the regulating device andtransmitted to the emulation computer; and after the execution of themodeled regulating function: data is transmitted from the emulationcomputer to the memory of the regulating device; and the regulatingdevice continues the execution of the regulating program; a protocol forthe data transmission between the regulating device and the emulationcomputer is adjusted; the adjustment is (a) dependent on the modeledregulating function being called and (b) performed using configurationdata; and the configuration data is used for configuring the firstsoftware interface and the second software interface.
 16. The controlarrangement of claim 15, wherein the data circuit is implemented as aserial bus system.
 17. The control arrangement of claim 15, wherein theserial bus system includes a controller area network bus.
 18. A hardwarecomputer-readable medium having stored thereon instructions executableby a processor, the instructions which, when executed by the processor,cause the processor to perform a method for controlling a motor vehicle,the method comprising: executing a regulating program to controlfunctions of the motor vehicle; during the execution and responsive to atrigger event, calling a regulating function modeled in an externalemulation computer, wherein, responsive to the calling, the externalemulation computer executes the modeled regulating function; one ofbefore and during the execution of the modeled regulating function,reading out data from a memory of the regulating device and transmittingthe read data to the external emulation computer; after the execution ofthe modeled regulating function: storing data received from the externalemulation computer in the memory of the regulating device; andcontinuing the execution of the regulating program; and adjusting aprotocol for the data transmission between the regulating device and theemulation computer, the adjustment (a) being dependent on the modeledregulating function being called, and (b) being performed usingconfiguration data; wherein the configuration data is used forconfiguring a software interface between the regulating device and theemulation computer.
 19. The computer-readable medium of claim 18,wherein the computer-readable medium includes one of a read-only memory,a random access memory and a flash memory.